//package com.diorsunion.hedge.io.netty;
//
//import com.diorsunion.hedge.io.Message;
//import io.netty.buffer.ByteBuf;
//import io.netty.channel.ChannelHandlerContext;
//import io.netty.handler.codec.MessageToByteEncoder;
//
///**
// * Created by harley-dog on 2016/5/17.
// */
//public class NettyMessageEncoder extends MessageToByteEncoder<Message> {
//
//    @Override
//    protected void encode(ChannelHandlerContext ctx, Message msg, ByteBuf out) throws Exception {
//        byte[] datas = ByteObjConverter.objectToByte(msg);
//        out.writeBytes(datas);
//        ctx.flush();
//    }
//}
